﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Mak_model;

namespace markets
{
    public partial class ShowData : Form
    {
        public List<GoodsInfo> show;
        public ShowData(List<GoodsInfo> thisshow)
        {
            InitializeComponent();
            this.show = thisshow;
            
        }

        private void ShowData_ui_Load(object sender, EventArgs e)
        {
            buyshow.AutoGenerateColumns = false;
            buyshow.DataSource = show;
            this.Close();
        }
        public GoodsInfo xuanzeo { get; set; }
        private void buyshow_KeyUp(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                if (buyshow.SelectedRows.Count == 1)
                {
                    int index = buyshow.SelectedRows[0].Index;
                    xuanzeo = show[index - 1];
                }
            }
        }

        
    }
}
